namespace Traceability.API.Dtos
{
    /// <summary>
    /// 图片上传响应DTO
    /// </summary>
    public class ImageUploadResponseDto
    {
        /// <summary>
        /// 图片URL
        /// </summary>
        public string Url { get; set; } = string.Empty;



        /// <summary>
        /// 原始文件名
        /// </summary>
        public string OriginalFileName { get; set; } = string.Empty;

        /// <summary>
        /// 保存的文件名
        /// </summary>
        public string SavedFileName { get; set; } = string.Empty;

        /// <summary>
        /// 文件大小（字节）
        /// </summary>
        public long FileSize { get; set; }

        /// <summary>
        /// 文件类型
        /// </summary>
        public string ContentType { get; set; } = string.Empty;

        /// <summary>
        /// 上传时间
        /// </summary>
        public DateTime UploadTime { get; set; }

        /// <summary>
        /// 是否为公共读权限（可直接通过URL在浏览器中访问）
        /// </summary>
        public bool IsPublicRead { get; set; } = true;
    }

    /// <summary>
    /// 多图片上传响应DTO
    /// </summary>
    public class MultipleImageUploadResponseDto
    {
        /// <summary>
        /// 成功上传的图片列表
        /// </summary>
        public List<ImageUploadResponseDto> SuccessImages { get; set; } = new List<ImageUploadResponseDto>();

        /// <summary>
        /// 失败的文件列表
        /// </summary>
        public List<FailedImageDto> FailedImages { get; set; } = new List<FailedImageDto>();

        /// <summary>
        /// 成功上传数量
        /// </summary>
        public int SuccessCount { get; set; }

        /// <summary>
        /// 失败数量
        /// </summary>
        public int FailedCount { get; set; }

        /// <summary>
        /// 总数量
        /// </summary>
        public int TotalCount { get; set; }
    }

    /// <summary>
    /// 失败的图片信息
    /// </summary>
    public class FailedImageDto
    {
        /// <summary>
        /// 原始文件名
        /// </summary>
        public string OriginalFileName { get; set; } = string.Empty;

        /// <summary>
        /// 失败原因
        /// </summary>
        public string ErrorMessage { get; set; } = string.Empty;
    }
}
